/*
 * Created on 2006-9-25
 *
 */
package edu.pku.sei.modeler.locator;

import org.eclipse.draw2d.ColorConstants;
import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.Label;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.draw2d.ToolbarLayout;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;

/**
 * @author zhangle
 *  
 */
public class DemoFigure extends Figure {
	public static Color classColor = new Color(null, 200,255,0);
//	public static Color classColor = new Color(null, 200,200,200);

	public DemoFigure(String name) {
		Font font = new Font(null, "Arial", 12, SWT.BOLD);
		Label label1 = new Label(name);
		label1.setFont(font);
		
		ToolbarLayout layout = new ToolbarLayout();
		setLayoutManager(layout);
		setBorder(new LineBorder(ColorConstants.black, 1));
		setBackgroundColor(classColor);
		setOpaque(true);

		add(label1);
	}
}